package kr.kgmyh.service;

import kr.kgmyh.dao.MemberDAO;
import kr.kgmyh.domain.Member;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service	//name=memberServiceImpl으로 빈 등록
public class MemberServiceImpl implements MemberService {
	
	@Autowired		//type으로 대입	//@Resource(name="memberDAOImpl") //name으로 대입
	private MemberDAO memberDAO;
	
	@Override
	public Member getMemberById(String id){
		return memberDAO.selectMemberById(id);
	}
	@Override
	public void joinMember(Member member){
		memberDAO.insertMember(member);
	}
}
